package com.fly.springbootTemplate.serviceImpl;

import com.fly.springbootTemplate.dao.StudentClassDao;
import com.fly.springbootTemplate.entity.StudentClass;
import com.fly.springbootTemplate.service.StudentClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class StudentClassServiceImpl implements StudentClassService {
    @Autowired
    private StudentClassDao studentClassDao;
    @Override
    public boolean addClass(StudentClass studentClass) {
        return studentClassDao.insertClass(studentClass);
    }

    @Override
    public boolean deleteClass(String classId) {
        return studentClassDao.deleteClass(classId);
    }

    @Override
    public boolean updateClass(StudentClass studentClass) {
        return studentClassDao.updateClass(studentClass);
    }

    @Override
    public List<StudentClass> getAllClass() {
        return studentClassDao.selectAllClass();
    }

    @Override
    public StudentClass getClassById(String classId) {
        return studentClassDao.selectClassById(classId);
    }



}
